<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="玩法">
        <el-select v-model="type" placeholder="请选择活动区域">
          <el-option label="排列三" value="2"></el-option>
          <el-option label="排列五" value="1"></el-option>
          <el-option label="福彩3D" value="3"></el-option>
          <el-option label="大乐透" value="4"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="期数">
        <el-input v-model="period"></el-input>
      </el-form-item>
      <el-form-item label="中奖号码">
        <el-input v-model="winNumber"></el-input>
      </el-form-item>
     <!-- <el-form-item label="日期">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择日期" v-model="date1" style="width: 100%;"></el-date-picker>
        </el-col>
        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
        <el-col :span="11">
          <el-time-picker placeholder="选择时间" v-model="date2" style="width: 100%;"></el-time-picker>
        </el-col>
      </el-form-item> -->
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import { createWinOrder } from '@/api/newTc'
  export default {
    name: 'inputLottery',
    data() {
      return {
        type: '',
        region: '',
        winNumber:'',
        date1: '',
        date2: ''
      }
    },
    created() {
    },
    methods: {
      //玩法选择
      selectTwo(e){
        this.init()
      },
      onSubmit() {
        let data = {
          period:this.period,
          type:this.type,
          winNumber:this.winNumber
        }
        createWinOrder(data).then(res=>{
          console.log(res)
          this.$message(res.message)
        })
      }
    }
  }
</script>

<style scoped>
  .app-container {
    margin-top: 40px;
    margin-left: 120px;
    margin-right: 120px;
    min-height: 500px;
  }
  .top {
    display: flex;
    align-items: center;
  }
  .inputDiv{
    width: 300px;
    margin-top: 10px;
  }
</style>
